package com.atzongmaotan.reggie.controller;

import com.atzongmaotan.reggie.common.R;
import com.atzongmaotan.reggie.entity.Orders;
import com.atzongmaotan.reggie.service.OrderDetailService;
import com.atzongmaotan.reggie.service.OrdersService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName:    OrderController
 * Package:  com.atzongmaotan.reggie.controller
 * Description:
 *
 * @Author: interface
 * @Create: 2024/6/25 - 下午4:58
 * @Version: v1.0
 */
@RestController
@RequestMapping("order")
@Slf4j
public class OrderController {
    @Autowired
    private OrdersService ordersService;
    @Autowired
    private OrderDetailService orderDetailService;
    @PostMapping
    public R<String> submitOrder(@RequestBody Orders orders) {
        ordersService.submitOrder(orders);
        return R.success("下订单成功");
    }


}
